package com.maruti.otterapi.trackbacks;

import com.maruti.otterapi.ListParameters;

public class TrackbackRequest {

	private String url;
	private String contains;
	private String infonly;
	private String sort_method;
	private String tracktype;
	private ListParameters listParams;

	public String getTracktype() {
		return tracktype;
	}

	public void setTracktype(String tracktype) {
		this.tracktype = tracktype;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public String getContains() {
		return contains;
	}

	public void setContains(String contains) {
		this.contains = contains;
	}

	public String getInfonly() {
		return infonly;
	}

	public void setInfonly(String infonly) {
		this.infonly = infonly;
	}

	public String getSort_method() {
		return sort_method;
	}

	public void setSort_method(String sort_method) {
		this.sort_method = sort_method;
	}

	public ListParameters getListParams() {
		return listParams;
	}

	public void setListParams(ListParameters listParams) {
		this.listParams = listParams;
	}

	public String toQuery() {
		String queryStr = "";
		queryStr += "url=" + url;

		if (contains != null)
			queryStr += "&contains=" + contains;

		if (infonly != null)
			queryStr += "&infonly=" + infonly;

		if (sort_method != null)
			queryStr += "&sort_method=" + sort_method;

		if (tracktype != null)
			queryStr += "&tracktype=" + tracktype;

		if (listParams != null)
			queryStr += listParams.toQuery();

		return queryStr;
	}
}
